package com.gba.mark.exam.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gba.mark.exam.entity.ExamAnswer;
import com.gba.mark.exam.entity.ExamPaper;
import com.gba.mark.exam.entity.ExamQuestions;
import com.gba.mark.exam.entity.ExamResult;
import com.gba.mark.exam.mapper.ExamAnswerMapper;
import com.gba.mark.exam.mapper.ExamQuestionsMapper;
import com.gba.mark.exam.service.ExamAnswerService;
import com.gba.mark.exam.service.ExamQuestionsService;
import com.gba.mark.exam.service.ExamResultService;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.List;

@Service
public class ExamAnswerImpl extends ServiceImpl<ExamAnswerMapper, ExamAnswer> implements ExamAnswerService {

    @Resource
    private ExamQuestionsMapper examQuestionsMapper;

    @Autowired
    private ExamQuestionsService examQuestionsService;

    @Autowired
    private ExamResultService examResultService;

    /**
     *保存并更新一份用户输入的答案
     */
    @Override
    public Integer saveAnswer (ExamAnswer examAnswer) {

        return this.baseMapper.insert(examAnswer);

    }

 }
